#ifndef __THREAD_H__ 
#define __THREAD_H__
#include <pthread.h>
#include <functional>
namespace wd{

using CallBack = std::function<void()>;
class Thread{

public:
    Thread(CallBack && cb);
    ~Thread();
    void start();
    void join();

private:

    //线程的入口函数
    static void * start_rountin(void * );

private:
    pthread_t _pthid;
    bool      _isRuning;
    CallBack  _cb;
        
};



}
#endif

